package descriptors;

import java.util.List;

public class ProcedureDescr extends AbstractDescr{

	String name;
	int lengthParBlock,frameSize,start;
	
	List<AbstractDescr> params;
	
	public ProcedureDescr(String fn, int ff,int fl, int fs ,List<AbstractDescr> fp){
		this.name=fn;
		this.frameSize=ff;
		this.lengthParBlock=fl;
		this.start=fs;
		this.params=fp;
	}
	
	public String name() {
		return name;
	}

	public int lengthParBlock() {
		return lengthParBlock;
	}

	public int frameSize() {
		return frameSize;
	}

	public int start() {
		return start;
	}

	public List<AbstractDescr> params() {
		return params;
	}

	@Override
	public void print() {
		int i = 0;
		trace("ProcdureDescr: " + name + "; start: " + start
				+ "; lengthparblock: " + lengthParBlock + "; framesize: "
				+ frameSize);
		if (params != null){
			for (i = 0; i < params.size(); i++)
				params.get(i).print();
		}
		unindent();
		
	}

}
